package com;

import com.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;

public class Application {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-context.xml");

        testBean(context);
    }


    private static void testBean(ApplicationContext context) {
        UserService userService = context.getBean(UserService.class);
        System.out.println(userService.findUserById("").getName());
    }
}
